package chapter02;

/**
 * 使用while与自增运算符循环遍历数组
 * 自增自减运算符分前置和后置两种,其中前置运算如++index，会先将index的值递增，然后再使用递增后的值，
 * 而后置运算如index++，会首先使用该变量的值，然后再把变量的值递增
 * Created by a on 2017/6/9.
 */
public class Test033 {
    public static void main(String[] args) {
        String[] aves = {"白鹭","丹顶鹤","黄鹂","鹦鹉","乌鸦","喜鹊","布谷鸟","灰文鸟","百灵鸟"};
//        for (int i =0;i<aves.length;i++){
//            System.out.println(aves[i]);
//        }
        int index = 0;
        while (index < aves.length){
            System.out.println(aves[index++]);
        }


    }
}
